/**
 * Software License, Version 1.0
 * 
 * Copyright 2003 The Trustees of Indiana University.  All rights reserved.
 * 
 *
 *Redistribution and use in source and binary forms, with or without 
 *modification, are permitted provided that the following conditions are met:
 *
 *1) All redistributions of source code must retain the above copyright notice,
 * the list of authors in the original source code, this list of conditions and
 * the disclaimer listed in this license;
 *2) All redistributions in binary form must reproduce the above copyright 
 * notice, this list of conditions and the disclaimer listed in this license in
 * the documentation and/or other materials provided with the distribution;
 *3) Any documentation included with all redistributions must include the 
 * following acknowledgement:
 *
 *"This product includes software developed by the Community Grids Lab. For 
 * further information contact the Community Grids Lab at 
 * http://communitygrids.iu.edu/."
 *
 * Alternatively, this acknowledgement may appear in the software itself, and 
 * wherever such third-party acknowledgments normally appear.
 * 
 *4) The name Indiana University or Community Grids Lab or NaradaBrokering, 
 * shall not be used to endorse or promote products derived from this software 
 * without prior written permission from Indiana University.  For written 
 * permission, please contact the Advanced Research and Technology Institute 
 * ("ARTI") at 351 West 10th Street, Indianapolis, Indiana 46202.
 *5) Products derived from this software may not be called NaradaBrokering, 
 * nor may Indiana University or Community Grids Lab or NaradaBrokering appear
 * in their name, without prior written permission of ARTI.
 * 
 *
 * Indiana University provides no reassurances that the source code provided 
 * does not infringe the patent or any other intellectual property rights of 
 * any other entity.  Indiana University disclaims any liability to any 
 * recipient for claims brought by any other entity based on infringement of 
 * intellectual property rights or otherwise.  
 *
 *LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO 
 *WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA UNIVERSITY GIVES
 *NO WARRANTIES AND MAKES NO REPRESENTATION THAT SOFTWARE IS FREE OF 
 *INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. 
 *INDIANA UNIVERSITY MAKES NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", 
 *"VIRUSES", "TROJAN HORSES", "TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE.  
 *LICENSEE ASSUMES THE ENTIRE RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR 
 *ASSOCIATED MATERIALS, AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION 
 *GENERATED USING SOFTWARE.
 */
package cgl.narada.wsinfra.wsrm;

import javax.xml.namespace.QName;

/** 
    This class provides a one-stop for all the QNames related to WSRM. 
    This eliminates the need to hard-code this in several places. Furthermore,
    if the spec changes the impact of this change will be felt at far fewer 
    places.
    
    @author Shrideep Pallickara
    $Date: 2005/02/24 19:05:24 $
    $Revision: 1.4 $
*/


public class WsrmQNames {
  
  private static final WsrmQNames instance = new WsrmQNames();
  private static final String wsrmUri = "http://schemas.xmlsoap.org/ws/2004/03/rm";
  
  private static final String wsrmxUri = "http://www.naradabrokering.org/NbWsrmExtension";
 
  private static final String wsuUri = "http://schemas.xmlsoap.org/ws/2002/07/utility";

  /** Elements related to WSRM exchanges */
  private static final QName createSequence = new QName(wsrmUri, "CreateSequence");
  private static final QName createSequenceResponse = new QName(wsrmUri, "CreateSequenceResponse");
  private static final QName terminateSequence = new QName(wsrmUri, "TerminateSequence");
  
  /** Elements related to WSRM headers */
  private static final QName sequence = new QName(wsrmUri, "Sequence");
  private static final QName ackRequested = new QName(wsrmUri, "AckRequested");
  private static final QName sequenceAcknowledgement = new QName(wsrmUri, "SequenceAcknowledgement");

  
  /** Elements related to WSRM policy elements */
  private static final QName sequenceCreation = new QName(wsrmUri, "SequenceCreation");
  private static final QName inactivityTimeout = new QName(wsrmUri, "InactivityTimeout");
  private static final QName baseRetransmissionInterval 
  = new QName(wsrmUri, "BaseRetransmissionInterval");
  
  private static final QName exponentialBackoff 
  = new QName(wsrmUri, "ExponentialBackoff");
  private static final QName acknowledgementInterval = 
  new QName(wsrmUri, "AcknowledgementInterval");
                      
  private static final QName sequenceRef = new QName(wsrmUri, "SequenceRef");
  private static final QName exact = new QName(wsrmUri, "Exact");
  private static final QName prefix = new QName(wsrmUri, "Prefix");


  private static final QName identifier = new QName(wsuUri, "Identifier");
  private static final QName expires = new QName(wsuUri, "Expires");


  private static final QName lastMessageNbx 
  = new QName(wsrmxUri, "LastMessage");
  private static final QName ackRequestedNbx
  = new QName(wsrmxUri, "AckRequested");
  private static final QName sequenceExpiresAtNbx
  = new QName(wsrmxUri, "SequenceExpiresAt");

  private String moduleName = "WsrmQNames: ";

  private WsrmQNames() {
  }

  public static WsrmQNames getInstance() {
    return instance;
  }
  
  /** Get QName associated with exchange */
  public QName getCreateSequence() {
    return createSequence;
  }

  /** Get QName associated with exchange */
  public QName getCreateSequenceResponse() {
    return createSequenceResponse;
  }

  /** Get QName associated with exchange */
  public QName getTerminateSequence() {
    return terminateSequence;
  }


  /** Get QName associated with Protocol element */
  public QName getSequence() {
    return sequence;
  }

  /** Get QName associated with Protocol element */
  public QName getAckRequested() {
    return ackRequested;
  }

  /** Get QName associated with Protocol element */
  public QName getSequenceAcknowledgement() {
    return sequenceAcknowledgement;
  }

  
  /** Get QName associated with wsrm Policy element */
  public QName getSequenceCreation() {
    return sequenceCreation;
  }
  

  /** Get QName associated with wsrm Policy element */
  public QName getInactivityTimeout() {
    return inactivityTimeout;
  }

  /** Get QName associated with wsrm Policy element */
  public QName getBaseRetransmissionInterval() {
    return baseRetransmissionInterval;
  }


  /** Get QName associated with wsrm Policy element */
  public QName getExponentialBackoff() {
    return exponentialBackoff;
  }


  /** Get QName associated with wsrm Policy element */
  public QName getAcknowledgementInterval() {
    return acknowledgementInterval;
  }


  /** Gets the QName associated with the SequenceRef element */
  public QName getSequenceRef() {
    return sequenceRef;
  }

  /** Returns the QName associated with the WSRM prefix element*/
  public QName getPrefix() {
    return prefix;
  }


  /** Returns the QName associated with the WSRM exact element*/
  public QName getExact() {
    return exact;
  }


  /** Returns the QName associated with WSRM sequence identifier element */
  public QName getIdentifier() {
    return identifier;
  }

  /** Returns the QName associated with WS-Utility expires element */
  public QName getExpires() {
    return expires;
  }


  /** Returns the QName associated with the properietary LastMessage indicator
      that applications can add to SOAP messages. This removed by the source 
      node after it processes the SOAP message, so the SINK node never gets 
      anything other than what's outlined in the specification. */
  public QName getLastMessageNBX() {
    return lastMessageNbx;
  }

  /** Returns the QName associated with the properietary AckRequested indicator
      that applications can add to SOAP messages. This removed by the source 
      node after it processes the SOAP message, so the SINK node never gets 
      anything other than what's outlined in the specification.*/
  public QName getAckRequestedNBX() {
    return ackRequestedNbx;
  }


  /** Returns the QName associated with the properietary SequenceExpiresAt
      indicator that applications can add to SOAP messages. This removed by 
      the source node after it processes the SOAP message, so the SINK node 
      never gets anything other than what's outlined in the specification.*/
  public QName getSequenceExpiresAtNBX() {
    return sequenceExpiresAtNbx;
  }
}






